package com.czh.auth.common.utils;

import com.czh.auth.common.constants.AuthConstant;
import com.czh.auth.common.context.UserContext;

import java.util.Objects;

/**
 * @author caozaihui
 * @version 1.0
 * @since 2024/10/3 22:41
 */

public class UserUtil {
    public static String getUserId(){
        Object o = UserContext.get(AuthConstant.USER_CONTEXT_ID);
        if (Objects.nonNull(o)){
            return o.toString();
        }
        return null;
    }
}
